package com.ruoyi.manager.controller;

import com.ruoyi.manager.mapper.TeacherAnalysisMapper;
import com.ruoyi.manager.service.TeachAnalysisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;
import java.util.Map;

@RequestMapping("/manager/analysis")
@Controller
public class AnalysisController { //

    @Autowired
    TeachAnalysisService teachAnalysisService;

    @RequestMapping("/teachAnalysisPage")
    public String toTeachAnalysisPage(){

        return "redirect:/analysis/teachAnalysis.html";
    }

    @ResponseBody
    @RequestMapping("/listClssesInfo")
    public List<Map<String,Object>> listClassesInfor(){

        return teachAnalysisService.listClassesInfor();
    }


    @ResponseBody
    @RequestMapping("/listClassesAvgScore")
    public List<Map<String,Object>> listClassesAvgScore(){

        return teachAnalysisService.listClassesAvgScore();
    }


    @ResponseBody
    @RequestMapping("/findClassCore")
    public List<Map<String,Object>> findClassCore(){

        return teachAnalysisService.findClassCore();
    }

    @ResponseBody
    @RequestMapping("/avgInfor")
    public Map<String,Object> avgInfor(){
        return teachAnalysisService.avgInfor();
    }

    @ResponseBody
    @RequestMapping("/exInfo")
    public Map<String,Object> exInfo(){
        return teachAnalysisService.exInfo();
    }


    @ResponseBody
    @RequestMapping("/listStudentCoreTaskCompleteRateLessForty")
    public List<Map<String,Object>> listStudentCoreTaskCompleteRateLessForty(){
        return teachAnalysisService.listStudentCoreTaskCompleteRateLessForty();
    }

    @ResponseBody
    @RequestMapping("/listStudentLevelCount")
    public Map listStudentLevelCount(){
        return teachAnalysisService.listStudentLevelCount();
    }

    @ResponseBody
    @RequestMapping("/workNum")
    public List<Map<String,Object>> workNum(){
        return teachAnalysisService.workNum();
    }

    @ResponseBody
    @RequestMapping("/assessNum")
    public List<Map<String,Object>> assessNum(){
        return teachAnalysisService.assessNum();
    }

    @ResponseBody
    @RequestMapping("listStudentplace")
    public List<Map<String,Object>>listStudentplace(){
        return teachAnalysisService.listStudentplace();
    };

    @ResponseBody
    @RequestMapping("listStudentAddress")
    public List<Map<String,Object>>listStudentAddress(){
        return teachAnalysisService.listStudentAddress();
    };


}
